package org.guys.magic.json;

/**
 * mock 类
 */
class Phone {
    private String phoneNumber;
    private String extNumber;

    @Override
    public String toString() {
        return "Phone{" +
                "phoneNumber='" + phoneNumber + '\'' +
                ", extNumber='" + extNumber + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof Phone)) return false;

        Phone phone = (Phone) o;

        if (!phoneNumber.equals(phone.phoneNumber)) return false;
        return !(extNumber != null ? !extNumber.equals(phone.extNumber) : phone.extNumber != null);

    }

    @Override
    public int hashCode() {
        int result = phoneNumber.hashCode();
        result = 31 * result + (extNumber != null ? extNumber.hashCode() : 0);
        return result;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getExtNumber() {
        return extNumber;
    }

    public void setExtNumber(String extNumber) {
        this.extNumber = extNumber;
    }
}